<?php
//	  PHPcongrats - Holiday and Birthday Mailer
//	
//    Copyright (C) 2011  Matthias Nass
//
//    This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
//
//    This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
//
//    You should have received a copy of the GNU General Public License along with this program; if not, see <http://www.gnu.org/licenses/>.


session_start();
$_SESSION['last_location'] = "./index.php";
if ($_SESSION['loggedin'] == true){
	?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>PHPcongrats Verwaltung</title>
<link rel="stylesheet" type="text/css" href="./styles.css">
</head>
<body>
	<h2>PHPcongrats <img src='./icons/rosette.png' alt='Rosette'/></h2>
	<h1>Verwaltung <img src='./icons/page_gear.png' alt='Gear Page'/></h1>
	<ul>
	<?php
	echo "<p class='teaser'>Hallo ".$_SESSION['username']."</p>";
	echo "<li> <a href='./users.php'><img src='./icons/user_go.png' alt='maintenance user'/> Benutzer Verwaltung</a></li>";
	echo "<li><a href='./text.php'><img src='./icons/note_go.png' alt='maintenance texts'/> Texte Verwaltung</a></li>";
	echo "<li> <a href='./holidays.php'><img src='./icons/date_go.png' alt='maintenance Holidays'/> Feiertage Verwaltung</a></li>";
	echo "<li> <a href='./persons.php'><img src='./icons/user_go.png' alt='maintenance Persons'/> Personen Verwaltung</a></li>";
	echo "<li><a href='./logout.php'><img src='./icons/cross.png' alt='Logout'/> Abmelden</a></li>";
	?>
	</ul>
</body>
</html>
	<?php
}
else{
	header( 'Location: http:./login.php' );
}
?>